package book;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: lenovo
 * Date: 2022-07-04
 * Time: 22:17
 */
public class Book {
  private String name;
  private String athuor;
  private String type;
  private double price;
  private boolean isBorrowed;

    public Book(String name, String athuor, String type, double price) {
        this.name = name;
        this.athuor = athuor;
        this.type = type;
        this.price = price;
    }

    @Override
    public String toString() {
        return "Book{" +
                "name='" + name + '\'' +
                ", athuor='" + athuor + '\'' +
                ", type='" + type + '\'' +
                ", price=" + price +
                ", " + ((isBorrowed==false)?"未借出":"已经借出") +
                '}';
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAthuor() {
        return athuor;
    }

    public void setAthuor(String athuor) {
        this.athuor = athuor;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public boolean isBorrowed() {
        return isBorrowed;
    }

    public void setBorrowed(boolean borrowed) {
        isBorrowed = borrowed;
    }
}
